/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package photoshare.services;

import java.sql.SQLException;
import java.util.ArrayList;
import photoshare.dao.FaqDAO;
import photoshare.dto.FaqDTO;

/**
 *
 * @author PhotoShare
 */
public class FaqService {

    public FaqService() {
    }

     public boolean create(FaqDTO faqDTO) throws SQLException {
        return new FaqDAO().create(faqDTO);
    }

    public ArrayList<FaqDTO> findAll() {
        return new FaqDAO().readAll();
    }

    public FaqDTO readById(Integer faqId) {
        return new FaqDAO().readById(faqId);
    }

    public boolean updateById(FaqDTO faqDTO, Integer faqId) throws SQLException {
        return new FaqDAO().updateById(faqDTO, faqId);
    }

    public boolean deleteById(Integer faqId) throws SQLException {

        return new FaqDAO().deleteById(faqId);
    }

}
